<%--
  Created by IntelliJ IDEA.
  User: THINKPAD
  Date: 2021/11/13
  Time: 11:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>注册</title>
</head>
<body>
    <form action="${pageContext.request.contextPath}/user/regist" method="post" id="registForm">
        <lable for="name">用户名：</lable><br>
        <input type="text" name="username" id="name" required><br>
        <lable for="Fpwd">密码：</lable><br>
        <input type="password" name="Fpassword" id="Fpwd" required><br>
        <lable for="pwd">再次输入密码：</lable><br>
        <input type="password" name="password" id="pwd" required><br>
        <input type="button" value="测试" onclick="ck()">
        <input type="submit" value="注册">
    </form>

    <script>
        function ck() {
            var a = document.getElementById("Fpwd").value;
            var b = document.getElementById("pwd").value;
            if (a==b){
                alert('内容一致！');
            }else{
                alert('内容不一致');
            }
        }
    </script>
</body>
</html>
